package com.rn_scgk;

import android.os.Bundle;

import com.facebook.react.ReactActivity;

import org.devio.rn.splashscreen.SplashScreen;

public class MainActivity extends ReactActivity {

    /**
     * Returns the name of the main component registered from JavaScript.
     * This is used to schedule rendering of the component.
     */
    @Override
    protected String getMainComponentName() {
        return "rn_rxsb";
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // 防止出现从安装页面启动返回桌面再次打开app重复启动的问题
        if (!isTaskRoot()) {
            finish();
            return;
        } else {
            SplashScreen.show(this, R.style.SplashScreenTheme);
        }
    }
}
